﻿
/*
NAILSUPERSTORE ® COMPANY
 
[HISTORY]
Created By  	: HUYNH PHI LONG
Created Date	: 12/20/2010
Modified By     :
Modified Date   :
Note            :

*/

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using CommonTagTime.DataAccess;
using CommonTagTime.ModelObject;

namespace CommonTagTime.Business
{
   public class busVideo
    {
        //------------------------------------------------
        //FIELD TABLE
        //------------------------------------------------
        public const string TABLE = "Video";
        public const string VIDEOID = "VideoID";
        public const string VIDEOFILE = "VideoFile";
        public const string SORTORDER = "SortOrder";
        public const string ThumbImage = "ThumbImage";
        public const string NAME = "Name";
        public const string ISACTIVE = "IsActive";
        public const string DESCRIPTION = "Description";
        public const string CREATEDBY = "CreatedBy";
        public const string CREATEDDATE = "CreatedDate";
        public const string UPDATEDBY = "UpdatedBy";
        public const string UPDATEDDATE = "UpdatedDate";
        public const string ORDERBY = "OrderBy";
        public const string ORDERDIRECTION = "OrderDirection";
        public const string CURRENTPAGE = "CurrentPage";
        public const string PAGESIZE = "PageSize";
        public const string CONDITION = "Condition";
        public const string TOTALRECORDS = "TotalRecords";

        private daoVideo _daoVideo;
        //------------------------------------------------
        //PUBLIC
        //------------------------------------------------
         public busVideo()
        {
            _daoVideo = new daoVideo();
        }

        public Video Detail(Video Video)
        {
            return _daoVideo.Detail(Video);
        }

        public VideoCollection List(Video Video)
        {
            return _daoVideo.List(Video);
        }
        public bool Delete(int VideoID)
        {
            return _daoVideo.Delete(VideoID);
        }
        public int Insert(Video objVideo)
        {
            return _daoVideo.Insert(objVideo);
        }
      
        public int Update(Video objVideo)
        {
            return _daoVideo.Update(objVideo);
        }
        public Video GetByID(int _VideoID)
        {
            if (_VideoID <= 0)
                return null;
            return _daoVideo.GetByID(_VideoID);
        }
        public bool Active(int VideoID)
        {
            if (VideoID <= 0)
                return false;
            return _daoVideo.Active(VideoID);
        }
        public bool DeActive(int VideoID)
        {
            if (VideoID <= 0)
                return false;
            return _daoVideo.DeActive(VideoID);
        }
        public bool OrderDown(int VideoID)
        {
            if (VideoID <= 0)
                return false;
            return _daoVideo.OrderDown(VideoID);
        }
        public bool OrderUp(int VideoID)
        {
            if (VideoID <= 0)
                return false;
            return _daoVideo.OrderUp(VideoID);
        }
    }
}
